package com.chengxiaoxiao.dao;

import com.chengxiaoxiao.domain.Books;
import com.chengxiaoxiao.domain.Borrow;
import com.chengxiaoxiao.domain.json.AuthorAndImage;

import java.util.List;

public interface BorrowDao extends CommonDao<Borrow> {
    int getTotalRecordsNum();

    int getTotalRecordsNumBorrow();

    List<Borrow> getListPageBorrow(int startIndex, int pageSize);

    int getTotalRecordsNumNoReturn();

    List<Borrow> getListPageBorrowNoReturn(int startIndex, int pageSize);

    int getTotalRecordsNumRank();

    List<Books> getListPageBorrowRank(int startIndex, int pageSize);

    int getTotalRecordsNumDestory();

    List<Borrow> getListPageBorrowDestory(int startIndex, int pageSize);

    List<Books> getListPageNewBook(int startIndex, int pageSize);

    int getTotalHotAuthor();

    List getListPageHotAuthor(int startIndex, int pageSize);

    AuthorAndImage getAuthorAndImage(String author);

    int getBorrowCountByUser(int uid);

    Borrow getBorrow(String userid, String bookId);

    List<Borrow> getBorrow(String userId);

    Borrow getBorrowNoReturn(String s, String bookId);

    List<Borrow> getExpire();

}
